/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package CastleDefense.Managers;

import CastleDefense.Game;
import java.util.Timer;
import java.util.TimerTask;

/**
 *
 * @author Firedemon
 */
public class DisplayManager
{
    private Timer timer;
    private float x;
    private float y;
    private String display;

    public DisplayManager(String str, float x, float y, int delay)
    {
        timer = new Timer();
        timer.schedule(new DisplayTask(), delay * 0, delay * 1000);

        this.display  = str;
        this.x        = x;
        this.y        = y;
    }

    class DisplayTask extends TimerTask
    {
        @Override
        public void run()
        {
            System.out.println("running..");
            Game.drawString(display, x, y);
        }
    }
}
